package ucalgary.seng401.tss;

import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class NumberPad extends JFrame {
	
	public JButton[] keys;
	public int numDigitsPressed;
	public int number;
	
	public NumberPad() {
		setSize(200,200);
		setVisible(true);
		setLayout( new GridLayout(4,3) );
		
		keys = new JButton[10];
		for ( int i = 1; i < keys.length; i++ ) {
			keys[i] = new JButton(i + "");
			getContentPane().add( keys[i] );
		}
		getContentPane().add( new JLabel("") );
		
		keys[0] = new JButton("0");
		getContentPane().add( keys[0] );
		getContentPane().add( new JLabel("") );
		
		numDigitsPressed = 0;
		
		
	}
	
	public void setNumDigitsPressed(int i ) {
		numDigitsPressed = i;
	}
	
	public int getNumDigitsPressed() {
		return numDigitsPressed;
	}
	
	public void setNumber(int i ) {
		number = i;
	}
	
	public int getNumber() {
		return number;
	}
	
	

}
